﻿using HMS.Core.Abstractions;
using Microsoft.EntityFrameworkCore.Infrastructure;

namespace HMS.Core.Impl;

internal class ModelRuntimeInitializerProvider : IModelRuntimeInitializerProvider
{
    private readonly DesignTimeDbContext designTimeDbContext;

    public ModelRuntimeInitializerProvider(DesignTimeDbContext designTimeDbContext)
    {
        this.designTimeDbContext = designTimeDbContext;
    }

    public IModelRuntimeInitializer ModelRuntimeInitializer
        => designTimeDbContext.GetService<IModelRuntimeInitializer>();
}